A pilot locked a woman co-pilotout of the cockpit of a Sydney-Colombo Sri Lankan Airlines flight when shetook a mid-air toilet break.